package pojo.cadastro.operacional;

//import pojo.financeiro.Despesa;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;

@Entity
@Table(name = "tbc_fornecedor")
@NamedQueries({
    @NamedQuery(name = "Fornecedor.listAll", query = "SELECT f FROM Fornecedor f ORDER BY f.razaoSocial")
})
public class Fornecedor implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "FOR_LON_ID")
    private long id;
    @Column(name = "FOR_TXT_RAZAO", length = 60, nullable = false)
    private String razaoSocial;
    @Column(name = "FOR_TXT_FANTASIA", length = 60)
    private String fantasia;
    @Column(name = "FOR_TXT_CNPJ", length = 14)
    private String cnpj;
    @Column(name = "FOR_TXT_ENDERECO", length = 60)
    private String endereco;
    @Column(name = "FOR_INT_NUMERO")
    private int numero;
    @Column(name = "FOR_TXT_COMPLEMENTO", length = 40)
    private String complemento;
    @Column(name = "FOR_TXT_TEL_COM", length = 14)
    private String telComercial;
    @Column(name = "FOR_TXT_TEL_CEL", length = 14)
    private String telCelular;
    @Column(name = "FOR_TXT_TEL_FAX", length = 14)
    private String telFax;
    @Column(name = "FOR_DTA_CAD", nullable = false)
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date dataCadastro;

//    @OneToMany(mappedBy = "despesa", fetch = FetchType.LAZY)
//    private List<Despesa> despesas;

    public String getCnpj() {
        return cnpj;
    }

    public void setCnpj(String cnpj) {
        this.cnpj = cnpj;
    }

    public String getComplemento() {
        return complemento;
    }

    public void setComplemento(String complemento) {
        this.complemento = complemento;
    }

    public Date getDataCadastro() {
        return dataCadastro;
    }

    public void setDataCadastro(Date dataCadastro) {
        this.dataCadastro = dataCadastro;
    }

//    public List<Despesa> getDespesas() {
//        return despesas;
//    }
//
//    public void setDespesas(List<Despesa> despesas) {
//        this.despesas = despesas;
//    }

    public String getEndereco() {
        return endereco;
    }

    public void setEndereco(String endereco) {
        this.endereco = endereco;
    }

    public String getFantasia() {
        return fantasia;
    }

    public void setFantasia(String fantasia) {
        this.fantasia = fantasia;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getNumero() {
        return numero;
    }

    public void setNumero(int numero) {
        this.numero = numero;
    }

    public String getRazaoSocial() {
        return razaoSocial;
    }

    public void setRazaoSocial(String razaoSocial) {
        this.razaoSocial = razaoSocial;
    }

    public String getTelCelular() {
        return telCelular;
    }

    public void setTelCelular(String telCelular) {
        this.telCelular = telCelular;
    }

    public String getTelComercial() {
        return telComercial;
    }

    public void setTelComercial(String telComercial) {
        this.telComercial = telComercial;
    }

    public String getTelFax() {
        return telFax;
    }

    public void setTelFax(String telFax) {
        this.telFax = telFax;
    }
    
}
